// @Author miaoqing
// @Date 2024/11/12 17:07:00
// @Desc
package logic

import (
	"core/common"
	"core/component/function"
	"core/component/logger"
	"time"
)

func (cli *Client) heartBeatHandler(data interface{}) {
	cli.lastTime = time.Now().Unix()
}

func (cli *Client) bindRobotIdHandler(data interface{}) {
	msgRecv := &common.RobotInfo{}
	err := function.MyUnmarshal(data, msgRecv)
	if err != nil {
		return
	}
	cli.onUserVerify(uint64(msgRecv.RobotId))
	//WorldGetMe().addRobotChan <- uint64(msgRecv.RobotId)
	logger.Infof("robotId: %v", msgRecv.RobotId)
}
